<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<link rel="stylesheet" type="text/css" href="css/manager.css">

  </head>
  
  <body>
    <h1 style="margin-bottom:0px;">键值对表单</h1>
  	<hr style="border:1px dashed #AAA;"/>
  	<input type="button" value="返 回" onclick="history.back();">
  	<input type="button" value="前 进" onclick="history.forward();">
  	<input type="button" value="刷 新" onclick="location.reload();">
  	<div style="display:${error==null?'none':''}" class="errorBox">${error}</div>
    <form action="keyval.do" method="post">
    <input type="hidden" name="method" value="${param.methodname!=null?param.methodname:'updateCompany'}">
    <input type="hidden" name="id" value="${company.id}">
    <ul>
    	<li>
    	公司名称（全称）：<br/><input type="text" alt="notNull" name="cname" value="${company.cname}" style="width:450px;">
    	</li>
    	<li>
    	公司详细地址：<br/><input type="text" name="caddress" value="${company.caddress}"  style="width:450px;">
    	</li>
    	<li>
    	公司规模：<br/>
    	<select name="cscale" style="width:200px;">
    		<option value="10" ${company.cscale==10?'selected="selected"':''}>10人以下</option>
    		<option value="100" ${company.cscale==100?'selected="selected"':''}>10-100人</option>
    		<option value="500" ${company.cscale==500?'selected="selected"':''}>100-500人</option>
    		<option value="1000" ${company.cscale==1000?'selected="selected"':''}>500-1000人</option>
    		<option value="-1" ${company.cscale==-1?'selected="selected"':''}>1000人以上</option>
    	</select>
    	</li>
    	<li>
    	公司经营业务：<br/>
    	<select name="cbusiness" style="width:200px;">
    		<option value="1" ${company.cbusiness==1?'selected="selected"':''}>电信</option>
    		<option value="2" ${company.cbusiness==2?'selected="selected"':''}>银行/金融/保险</option>
    		<option value="3" ${company.cbusiness==3?'selected="selected"':''}>教育</option>
    		<option value="4" ${company.cbusiness==4?'selected="selected"':''}>医疗</option>
    		<option value="5" ${company.cbusiness==5?'selected="selected"':''}>政府</option>
    		<option value="6" ${company.cbusiness==6?'selected="selected"':''}>互联网</option>
    		<option value="7" ${company.cbusiness==7?'selected="selected"':''}>餐饮</option>
    		<option value="8" ${company.cbusiness==8?'selected="selected"':''}>其他</option>
    	</select>
    	</li>
    	<li style="display:none;">
    	公司地图（可选）：<br/><textarea name="cmap" cols="80"> ${company.cmap}</textarea>
    	</li>
    	<li>
    	公司简介（必填）：<br/><textarea alt="notNull" name="cdesc" rows="8" cols="120">${company.cdesc}</textarea>
    	<br/><label>简介请控制在1000字以内</label>
    	</li>
    	<li>
    	公司评分（所有公司的基础分为100分且可为负）：<br/><input type="text" name="cscore" value="${company.cscore}" style="width:450px;">
    	</li>
    </ul>
    <input type="submit" value="确 定 ">
    </form>
  </body>
  <script type="text/javascript" src="js/javer.js"></script>
  <script type="text/javascript" src="js/validate.js"></script>
  <script type="text/javascript">
  	if ('${param.detail}' == '1') {
  		var eles = document.forms[0].elements;
  		for (var i = 0; i < eles.length; i++) {
  			eles[i].setAttribute("disabled", "disabled");
  		}
  	}
  </script>
</html>
